﻿using System.Collections.Generic;

namespace pinduoduo.Model
{

    public class Goods
    {
        public string sku_id { get; set; }
 
        public string goods_id { get; set; }
 
        public int sku_number { get; set; }
    }

    public class PDDOrder
    {
        public string address_id { get; set; }
       
        public List<Goods> goods { get; set; }

        public int app_id { get; set; } = 3;
      
        public string group_id { get; set; }
        public string group_order_id { get; set; }
        
        public string activity_id { get; set; }
        
        public string merchant_coupon_id { get; set; } = "";
    }

    public class PDDOrderResponse
    {
        /// <summary>
        /// 
        /// </summary>
        public int server_time { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string order_sn { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string group_order_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int order_amount { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string fp_id { get; set; }
    }


    public class Query
    {
        /// <summary>
        /// 
        /// </summary>
        public string service { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string partner { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string seller_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string payment_type { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string notify_url { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string out_trade_no { get; set; }
        /// <summary>
        /// 鍟嗘埛鍗曞彿XP2021031317201033397503000534
        /// </summary>
        public string subject { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string total_fee { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string return_url { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string sign { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string sign_type { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string goods_type { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string _input_charset { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string it_b_pay { get; set; }
    }

    public class PDDOrderPrepayResponse
    {
        /// <summary>
        /// 
        /// </summary>
        public int server_time { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string gateway_url { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public Query query { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int status { get; set; }
    }


    

    public class Attribute_fields
    {
        /// <summary>
        /// 
        /// </summary>
        public int paid_times { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string forbid_contractcode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string forbid_pappay { get; set; }
    }

    public class PDDOrderPrepay
    {
        /// <summary>
        /// 
        /// </summary>
        public int pay_app_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int version { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public Attribute_fields attribute_fields { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string return_url { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string order_sn { get; set; }
    }



    public class OrderModel
    {
        public OrderModel()
        {
            timeout = 1300;
            type = "all";
            page = 1;
            pay_channel_list = new List<string>() { "9", "30", "31", "35", "38", "52", "-1" };
            origin_host_name = "mobile.yangkeduo.com";
            size = 50;
            offset = "0";
        }
        //public OrderModel() { }

        public void GetOrderType(string type)
        {
            switch (type)
            {
                case "所有订单":
                case "全部订单":
                    this.type = "all";
                    break;

                case "待付款":
                    this.type = "unpaidV2";
                    break;

                case "待分享":
                    this.type = "grouping";
                    break;

                case "待发货":
                    this.type = "unshipping";
                    break;

                case "待收货":
                    this.type = "unreceived";
                    break;

                case "待评价":
                    this.type = "unrated";
                    break;

                default:
                    break;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public int timeout { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string type { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int page { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public List<string> pay_channel_list { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string origin_host_name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int size { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string offset { get; set; }
    }


    public class Unrated
    {
        public Unrated()
        {
            pictures = new List<Images>();
            labels = new List<string>();
            comment = "";
        }
        /// <summary>
        /// 
        /// </summary>
        public string goods_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string order_sn { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string comment { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public List<Images> pictures { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public List<string> labels { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int anonymous { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int timeline_sync_type { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int comprehensive_dsr { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string anti_content { get; set; }
    }

    //如果好用，请收藏地址，帮忙分享。
    public class Images
    {
        /// <summary>
        /// 
        /// </summary>
        public string url { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int width { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int height { get; set; }
    }

    public class OrderStatus
    {

        public OrderStatus()
        {
            is_up_to_date = true;
            origin_host_name = "mobile.yangkeduo.com";
            pay_channel_list = new List<string>() { "2", "9", "30", "31", "35", "38", "52", "97", "122", "135", "322", "-1" };
        }
        /// <summary>
        /// 
        /// </summary>
        public long ts { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public List<string> pay_channel_list { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public bool is_up_to_date { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string origin_host_name { get; set; }
    }

}
